<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>百度富文本框-demo</title>
    <script src="/scripts/vue.js"></script>
    <script src="/scripts//axios.min.js"></script>
    <script src="/scripts/heyui/heyui.js"></script>
    <link rel="stylesheet" href="/scripts/heyui/css/heyui.blue.theme.css">
    <link rel="stylesheet" href="/styles/global.css">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_2024630_5pfup58gnm.css">
    <script src="/scripts/lib.js"></script>
</head>

<body>


    <div id="app">
        <div class="page-body">
            <!--使用 baidu-editor 组件 -->
            <baidu-editor :datas="content" ref="ue_content"></baidu-editor>
            <h-button @click="submit">获取内容</h-button>
        </div>
    </div>

</body>

</html>
<!--引入js包 包含组件 baidu-editor-->
<script type="text/javascript" src="/scripts/ueditor/index.js"></script>
<script>

    /**
     * 该包使用少很多,所以不合并在通用库中
    */
    new Vue({
        el: "#app",
        data: {
            content: "动态设置内容"
        },
        methods: {
            submit() {
                var content = this.$refs.ue_content.getContent(); //调用方法获取结果
                console.log(content);
            }
        },
        mounted() {

        },
    })

</script>